import Pagination from './Pagination.vue'
import Excel from './Excel.vue'
import commonApi from './commonApi'
import {timeFormat, dateFormat} from '~/components/common/dateFormat'
import SecondaryMenu from './SecondaryMenu.vue'
import exports from './Export.vue'
import bar from '~/components/backend/common/ActionBar.vue'

const components = [
  Pagination,
  Excel,
  SecondaryMenu,
  exports,
  bar
]

const install = (Vue, opts = {}) => {
  Vue.prototype.$query = new commonApi()
  Vue.prototype.$dateFormat = dateFormat
  Vue.prototype.$timeFormat = timeFormat

  components.map((component) => {
    Vue.component(component.name, component)
  })
}



export default {
  install
}
